package com.ryan.util;

import java.io.File;

import brut.androlib.ApkDecoder;

public class ApkUtil {

	public static void cmdDecode(String apkFile, String outputPath){
		ApkDecoder decoder = new ApkDecoder();
		decoder.setDebugMode(true);
		decoder.setForceDelete(true);
		
		try{
			decoder.setDecodeSources((short)0);
			String outName = outputPath;
			File outDir = new File(outName);
			decoder.setOutDir(outDir);
			decoder.setApkFile(new File(apkFile));
			decoder.decode();
		}catch(Exception e){
			e.printStackTrace();
		}
	}
	
	public static void main(String[] args) {
		String path = "D:/android/20140116/";
		String target = path + "0114火柴人/com.hitcents.stickmanepiccu1.71";
		String source = target + ".apk";
		ApkUtil.cmdDecode(source, target);
	}
}
